package com.example.reader.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.common.api.reader.ReaderService;
import com.example.common.model.Article;
import com.example.common.model.Catalog;
import com.example.common.otherObject.Articles;
import com.example.reader.dao.ReaderDao;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0.0")
@org.springframework.stereotype.Service
public class ReaderServiceImpl implements ReaderService {

    @Autowired
    ReaderDao readerDao;

    @Override
   public List<Articles> showArticle(Integer pn){

        List<Articles> list=readerDao.getArticles(pn);

        return list;
    }

    public  List<Catalog> showCatalog(){
        List<Catalog> list=readerDao.getCatalogs();
        return list;
    }
}
